package com.yonyou.pmclouds.inspectitem.mapper;

import com.yonyou.pmclouds.basecom.cache.RedisCache;
import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.inspectitem.entity.InspectItemVO;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

@CacheNamespace(implementation = RedisCache.class)
public interface InspectItemMapper extends BaseMapper<InspectItemVO>{

    InspectItemVO[] selectByBill(String pk_bill) throws BusinessException;

    InspectItemVO[] queryByConstructPks(@Param("constructPks") String[] constructPks);

    InspectItemVO[] queryByPks(@Param("pks") String[] pks);

    // FIXME 不要尝试直接拼接sql
    @Deprecated
    InspectItemVO[] queryByBillPks(@Param("pkBills") String pkBills);

    InspectItemVO[] queryByPkBillsAndStatus(@Param("pkBills") String[] pkBills, @Param("status") Integer status);

    InspectItemVO[] queryByPkBills(@Param("pkBills") String[] pkBills);

}
